In H.264/MPEG-4 AVC, one picture is divided into a plurality of macroblocks, and each macroblock is encoded by generating a prediction block using inter prediction or intra prediction. A residual block between an original block and the prediction block is transformed to generate a transformed block, and the transformed block is quantized using a quantization parameter and a predetermined quantization matrix. The quantized coefficients of the quantized block are scanned using a scan pattern and then entropy-coded. The quantization parameter is adjusted per macroblock and encoded predictively using a previous quantization parameter.
In inter prediction mode, motion estimation is used to eliminate temporal redundancy between consecutive pictures. To detect the temporal redundancy, one or more reference pictures are searched to estimate motion of a current block, and motion compensation is performed to generate a prediction block using motion information. A block very similar to an original block is searched in a predetermine range of the reference picture. If the block similar to an original block is searched, a residual block between the original block and the searched block and motion information are encoded and transmitted to a decoding side.
The motion information includes at least one reference picture index and at least one motion vector. The motion vector is coded predictively. That is, a motion vector predictor is generated using motion vectors of neighboring block, and the difference between the motion vector and the motion vector predictor is encoded to reduce the amount of coding bits required to encode the motion vector. In H.264, a median of a left motion vector, an above motion vector and an above left motion vector is used as the motion vector predictor.
However, if a motion of the current block is different from motions of the neighboring blocks, the coding efficiency of the motion vector according to the H.264 degrades. Also, when the motion information is the same as one of the neighboring block, the motion vector predictor of H.264 degrades the coding efficiency.
Furthermore, if the various sizes of coding unit are used for inter prediction, adjusting quantization parameter per coding unit results in increase of coding bits required to encode the quantization parameter, and the correlation between the quantization parameter and the previous quantization parameter becomes weaker than that of H.264.